﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Forget.HRBLL.Logical;

namespace HRWebSite.User
{
    public partial class CreateUser : BasePage
    {       
        protected override void Page_Load(object sender, EventArgs e)
        {
            this.HRLimitAttribute = Forget.HRBLL.LimitAttribute.Read | Forget.HRBLL.LimitAttribute.Add;
            this.HRLimits = Limits.UserManage;
            this.Page.Title = "创建用户";
            base.Page_Load(sender, e);
        }        
        protected void Button1_Click1(object sender, EventArgs e)
        {
            if (!UserLogical.CreateUser(this.TextBox1.Text, this.TextBox3.Text, this.TextBox2.Text, this.TextBox5.Text, this.TextBox4.Text))
                this.Literal1.Text = "<span style=\"color: #FF0000\">系统出现故障，请等待或与管理员联系！</span>";
            else
                Response.Redirect(@"~\user\createuser.aspx");
        }
    }
}